from WindPy import *
w.start()

stockIDstr = '000069.SZ, 002352.SZ, 600030.SH, 002027.SZ, 002304.SZ, 001979.SZ, 600104.SH, 601390.SH, 300003.SZ, 002594.SZ, 600340.SH, 601601.SH, 600642.SH, 600271.SH, 600276.SH, 600690.SH, 601628.SH, 600028.SH, 002415.SZ, 600518.SH, 600741.SH, 601766.SH, 600585.SH, 000046.SZ, 601006.SH, 600837.SH, 000581.SZ, 601216.SH, 300070.SZ, 601211.SH, 002081.SZ, 601229.SH, 601238.SH, 002202.SZ, 600606.SH, 600999.SH, 600900.SH, 601727.SH'

#stockIDstr = stockIDstr + '002594.SZ, 600109.SH, 600027.SH, 600271.SH, 002558.SZ, 600196.SH, 000538.SZ, 300003.SZ, 300070.SZ, 600056.SH, 603288.SH, 600535.SH, 600436.SH, 300136.SZ, 300296.SZ'
#stockIDstr = stockIDstr + '002024.SZ,000069.SZ,600015.SH,601818.SH,601555.SH,600352.SH,601328.SH,000895.SZ,600208.SH,600674.SH,601788.SH,600023.SH,600177.SH,600027.SH,600637.SH,600999.SH,600739.SH,600535.SH,600157.SH,000998.SZ,600642.SH,600369.SH,600682.SH,002007.SZ,'
#stockIDstr = stockIDstr + '600170.SH,601998.SH,600221.SH,600804.SH,600027.SH,603288.SH,600177.SH,600705.SH,600535.SH,300003.SZ,000793.SZ,600415.SH,600157.SH,600352.SH,600208.SH,600674.SH,601788.SH,600023.SH,600177.SH,600027.SH,600637.SH,600999.SH,600739.SH,600535.SH,'
#stockIDstr = stockIDstr + '600157.SH,000998.SZ,600642.SH,600369.SH,600682.SH,600804.SH,603288.SH,600352.SH,000046.SZ,600398.SH,600201.SH,601238.SH,600959.SH,002465.SZ,600066.SH,000157.SZ,600111.SH,601398.SH,000623.SZ,000776.SZ,600157.SH,600535.SH,601939.SH,600015.SH,'
#stockIDstr = stockIDstr + '601398.SH,601288.SH,601328.SH,600682.SH,601169.SH,600000.SH,600177.SH,600705.SH,300124.SZ,600352.SH,002007.SZ,600535.SH,601899.SH,600795.SH,601939.SH,601857.SH,600015.SH,601169.SH,002304.SZ,000538.SZ,600009.SH,600157.SH,600111.SH,600027.SH,'
#stockIDstr = stockIDstr + '600031.SH,603288.SH'
#stockIDstr = '600023.SH,600535.SH,600115.SH,600637.SH,601006.SH,600999.SH,600900.SH,000157.SZ,600111.SH,601398.SH,000623.SZ,002007.SZ,600027.SH,600804.SH,600741.SH,601939.SH,600170.SH,600958.SH,600085.SH,601857.SH,600739.SH,601012.SH'
checkDate = '2018-02-01'




resStockID = w.wsd(stockIDstr, 'share_rtd_unlockingdate', checkDate, checkDate, 'PriceAdj=B')

stockIdList = resStockID.Codes

unlockingDateList = resStockID.Data[0]

stockNumber = len(unlockingDateList)

for i in range(0, stockNumber):
    print('Unlocking date of stock: ' + stockIdList[i] + ' is ' + str(unlockingDateList[i]) + ' .' )


print('ok')

